﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using BOHVote.DAL;
using BOHVote.Common;

namespace BOHVote.BLL
{
    public static class PeriodClass
    {
        public static DataSet getAllPeriod()
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.getAllProvide("", "", "", "");
        }
        public static DataSet getAperiod()
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.getAllProvide("A", "", "", "");
        }

        public static DataSet getAperiod(string status, string PeriodID)
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.getAllProvide(status, PeriodID, "", "");
        }
        public static DataSet getPeriodByID(string strPeriodID)
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.getAllProvide("", strPeriodID, "", "");
        }
        public static DataSet getPeriod(string status, string strPeriodName, string ArchivesStatus)
        {
            PeriodProvide pp = new PeriodProvide();
            DataSet dst = pp.getAllProvide(status, "", strPeriodName, ArchivesStatus);
            return dst;
        }

        public static int InsertPeriod(string ApplyPeriodID, string DateFrom, string ApplyPeriodName, string DateTo, string ArchivesStatus, string DataEnteredUserID,string status)
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.InsertPeriod(ApplyPeriodID, DateFrom, ApplyPeriodName, DateTo, ArchivesStatus, DataEnteredUserID, status);
        }

        public static int UpdatePeriod(string ApplyPeriodID, string DateFrom, string ApplyPeriodName, string DateTo, string ArchivesStatus, string DatachangedUserID,string status)
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.UpdatePeriod(ApplyPeriodID, DateFrom, ApplyPeriodName, DateTo, ArchivesStatus, DatachangedUserID, status);
        }
        public static int DeletePeriodByID(string ApplyPeriodID)
        {
            PeriodProvide pp = new PeriodProvide();
            return pp.DeletePeriodByID(ApplyPeriodID);
        }
    }
}
